<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <child @click.native="handle"></child><!-- @click是监听组件事件的，若要监听原生事件（vm中）要加native -->
    </div>
    <script>
        Vue.component('child',{
            template:'<div>child</div>'
        })
        var vm=new Vue({
            el:'#app',
            methods:{
                handle:function(){
                    alert('child');
                }
            }
        })
    </script>
</body>
</html>